const { sequelize, User } = require('../models');

(async () => {
  try {
    await sequelize.authenticate();
    const u = await User.findOne();
    console.log(u ? u.toJSON() : 'no user found');
    process.exit(0);
  } catch (err) {
    console.error(err);
    process.exit(1);
  }
})();